home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ File Icons 1.xpl < prev    next >
Text File  |  1999-06-11  |  3KB  |  80 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="3"
  4. "UIPATH"="Appearance\Explorer\Files"
  5. "NAME"="Special File Icons"
  6. "VERSION"="1.34"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display *.BMP files as mini-preview"
  9. "TEXT 2"="Display *.CPL files as icon"
  10. "TEXT 3"="Display *.DLL files as icon"
  11. "DESCRIPTION 1"="Activating the first option will display BMP files (Bitmap Pictures) as mini-preview. This might slow down your computer if you are viewing a directory with many pictures!"
  12. "DESCRIPTION 2"="Activating option two and three will display the icon inside the files rather than the default Windows icon."
  13. "DESCRIPTION 3"="Note: DO NOT activate 'Display BMP files as mini-preview' if you are using IE 5 with ActiveDesktop installed. This option may crash your Explorer in this case."
  14. "AUTHOR"="Xteq Systems"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  17.  
  18.  
  19. 'Called when the Plugin is started
  20. SUB Plugin_Initialize
  21.   s=RegReadValue("HKCR\Paint.Picture\DefaultIcon\@")
  22.   if s="%1" then SetUIElement 1,true
  23.  
  24.   s=RegReadValue("HKCR\cplfile\DefaultIcon\@")
  25.   if s="%1" then SetUIElement 2,true
  26.  
  27.   s=RegReadValue("HKCR\dllfile\DefaultIcon\@")
  28.   if s="%1" then SetUIElement 3,true
  29. END SUB
  30.  
  31. 'Called when the Plugin should validate the Data the user has entered
  32. SUB Plugin_CheckData(ElementIndex)
  33. END SUB
  34.  
  35. 'Called when the Plugin should apply the changes
  36. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  37.  b=GetUIElement(1)
  38.  Call DoChange(b,"HKCR\Paint.Picture\")
  39.  
  40.  b=GetUIElement(2)
  41.  Call DoChange(b,"HKCR\cplfile\")
  42.  
  43.  b=GetUIElement(3)
  44.  Call DoChange(b,"HKCR\dllfile\")
  45. END SUB
  46.  
  47.  
  48. 'Called when the Plugin is about to be removed from memory
  49. SUB Plugin_Terminate
  50. END SUB
  51.  
  52.  
  53. Sub DoChange(Activate, RegPath)
  54.  if Activate=true then
  55.   'save backup
  56.   s=RegReadValue(RegPath & "DefaultIcon\@")
  57.  
  58.   if s<>"%1" then
  59.    Call RegWriteValue(RegPath & "DefaultIcon\K/oS X-Setup Backup",s,1)
  60.  
  61.    'apply changes
  62.    Call RegWriteValue(RegPath & "DefaultIcon\@","%1",1)
  63.   end if
  64.  else
  65.   'restore backup
  66.   s=RegReadValue(RegPath & "DefaultIcon\K/oS X-Setup Backup")
  67.  
  68.   if IsEmpty(s)=false then
  69.    Call RegWriteValue(RegPath & "DefaultIcon\@",s,1)
  70.    'remove backup
  71.    Call RegDeleteValue(RegPath & "DefaultIcon\K/oS X-Setup Backup") 
  72.   else
  73.    'wooops! Something is wrong!
  74.    Call RegWriteValue(RegPath & "DefaultIcon\@","",1)
  75.    'Call MsgError("Error while trying to remove function for <" & RegPath & "> - no backup could be found!")
  76.   end if
  77.  end if
  78.  
  79. end Sub
  80.